/**
 * @author akaovi
 * @version 1.0
 * @description
 * @date 2022/11/14 15:40
 * @since 2022/11/14 15:40
 */
public class One {
    public static void main(String[] args) {
        new Thread(() -> {
            while (true) {
                System.out.println("A");
                try {
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();

        new Thread(() -> {
            while (true) {
                System.out.println("B");
                try {
                    Thread.sleep(300);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();

        while (true) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
